package datatypes;

/**
 * Describes a frequency range
 * 
 * @author Bart Moens
 */
public class FrequencyRange {
	public double from;
	public double to;
	
	public FrequencyRange(double from, double to) {
		this.from = from;
		this.to = to;
		
	}
	
	public boolean isBetween(double freq) {
		if (freq >= from && freq <= to) {
			return true;
		}
		return false;
	}

	public double mean() {
		return (int)(from+to)/2;
	}
	
	public String toString() {
		return "[" + from + "-"+ to + "]";
	}
}
